﻿/**
 * 
 * @file TreeWidgetProp.h
 * @brief 属性页面声明
 * @author LiBaojun (libaojunqd@foxmail.com)
 * @date 2024-10-12
 * 
 */
#ifndef _TREE_WIDGET_PROP_H___
#define _TREE_WIDGET_PROP_H___

#include "ControlPanel.h"

namespace GUI
{
    /**
     * @brief 属性页面
     * @author LiBaojun (libaojunqd@foxmail.com)
     * @date 2024-10-12
     */
    class GUIWIDGETAPI TreeWidgetProp: public TreeWidgetPage
    {
    public:
        /**
         * @brief Construct a new Tree Widget Prop object
         * @param[i]  parent         父对象
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-12
         */
        explicit TreeWidgetProp(QWidget* parent = nullptr);
        /**
         * @brief Destroy the Tree Widget Prop object
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-12
         */
        virtual ~TreeWidgetProp() = default;
        /**
         * @brief 获取类型
         * @return TreeWidgetType 
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-12
         */
        TreeWidgetType getTreeWidgetType() override;



    private:
        /**
         * @brief 初始化树形菜单
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-18
         */
        void initTree();

        /**
         * @brief 树形菜单节点点击事件，子类重写实现
         * @param[i]  item           点击对象
         * @param[i]  column         列数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-08
         */
        virtual void on_itemClicked(QTreeWidgetItem *item, int column) override;
        /**
         * @brief 树形菜单节点双击事件，子类重写实现
         * @param[i]  item           点击对象
         * @param[i]  column         列数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-10-08
         */
        virtual void on_itemDoubleClicked(QTreeWidgetItem *item, int column) override;


    };
}


#endif
